<?php
    echo "<h2> Master Jobs </h2>";
   
    $category[1] = 'All';
    $category[2] = 'Waiting Approval';
    $category[3] = 'Published';
    $category[4] = 'Has Expired';
    $category[5] = ' > 6 months';
    $category[6] = 'Waiting Payment';
    $category[7] = ' > 6 months';
    
    echo "<form id='filter'>";
        echo "<label id='left' style='text-align:right'>Category : &nbsp</label>"; 
        echo "<label id='center'>".$form->select('category',$category)."</label>";        
        echo "<br>";
        echo "<label id='left' style='text-align:right'>ID : &nbsp</label>"; 
        echo $form->input('id',array('label'=>false,'div'=>false,'onFocus'=>"document.getElementById('employer_id').value='';document.getElementById('name').value='';"));
        echo " &nbsp Employer ID : "; 
        echo $form->input('employer_id',array('label'=>false,'div'=>false,'onFocus'=>"document.getElementById('id').value='';document.getElementById('name').value='';"));
        echo " &nbsp Position : "; 
        echo $form->input('name',array('label'=>false,'div'=>false,'onFocus'=>"document.getElementById('id').value='';document.getElementById('employer_id').value='';"));
    echo "</form>";    
    
    
    
    echo $ajax->observeForm('filter',
                            array('url'=>array('controller'=>'jobs','action'=>'filter_admin'),
                            'update'=>'result','frequency' => 0.2)
                            );
    echo "<br>";
    echo "<div id='result'></div>";          
?>